#!perl -T

use Test::More tests => 9;

use Image::DCMTK qw(:ALL);

is (makeXMLElement( {GRP => "0001", ELEM => "0001", VALUE => "Test", VR => "PN"}), q!<element tag="0001,0001" vr="PN" vm="1" len="4" name="None">Test</element>!, "makeXMLElement - Tag does not exist");
is (makeXMLElement( {GRP => "0008", ELEM => "0010", VALUE => "Test", VR => "PN"}), q!<element tag="0008,0010" vr="PN" vm="1" len="4" name="None">Test</element>!, "makeXMLElement - Element does not exist");
is (makeXMLElement( {DCM_DICT_NAME => "PatientName", VALUE => "Test"}), q!<element tag="0010,0010" vr="PN" vm="1" len="4" name="PatientName">Test</element>!, "makeXMLElement - 3.6 Tag name");
is (makeXMLElement( {DCM_DICT_NAME => "PatientsName", VALUE => "Test"}), q!<element tag="0010,0010" vr="PN" vm="1" len="4" name="PatientsName">Test</element>!, "makeXMLElement - 3.5 Tag name");
is (makeXMLElement( {DCM_DICT_NAME => "NotAName", VALUE => "Test"}), undef, "makeXMLElement - Name not in Dictionary");
is (makeXMLElement( {DCM_DICT_NAME => "ImageDataTypeSequence", VALUE => "Test"}),undef, "makeXMLElement - 3.6 Tag is a sequence");
is (makeXMLElement( {GRP => "FFFE", ELEM => "E0DD", VALUE => "Test", VR => "PN"}),undef, "makeXMLElement - 3.6 Tag is a close sequence");
is (makeXMLElement( {GRP => "FFFE", ELEM => "E000", VALUE => "Test", VR => "PN"}),undef, "makeXMLElement - 3.6 Tag is a open item");
is (makeXMLElement( {GRP => "FFFE", ELEM => "E00D", VALUE => "Test", VR => "PN"}),undef, "makeXMLElement - 3.6 Tag is a close item");
